package com.tcdp.daos;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.NoResultException;
import javax.persistence.Persistence;

public abstract class AbstractDao {

	protected EntityManagerFactory factory = Persistence.createEntityManagerFactory("tcdp");
	protected EntityManager em = factory.createEntityManager();
	protected EntityTransaction tx = em.getTransaction();
	
	protected void throw404(NoResultException e){
		throw e;
	}
	
}
